package com.jingdong.service.product;

import com.jingdong.dao.product.ProductDao;
import com.jingdong.model.Product;
import com.sun.tracing.dtrace.Attributes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductDao productDao;

    @Override
    public List<Product> productList(Map<String,String> map) {
        return productDao.productList(map);

    }

    @Override
    public Product getById(int id) {
        return productDao.getById(id);
    }

    @Override
    public int update(Product product) {
        return productDao.update(product);
    }

    @Override
    public int delete(int id) {
        return productDao.delete(id);
    }
}
